package com.wdm.sms.entity.common.base;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @author: wudaiming
 * @date: 2023/3/6
 * @version: 1.0
 */
@ApiModel(
        value = "BasePO",
        description = "基础实体类"
)
@Data
public class BasePO {
    @ApiModelProperty("主键ID")
    @TableId(
            value = "id",
            type = IdType.ASSIGN_UUID
    )
    private String id;
    /**
     * 逻辑删除
     */
    @TableField("deleted")
    @TableLogic
    private Integer deleted;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 版本
     */
    @TableField("version")
    @Version
    private Integer version;
}
